<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"  %>
   
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Occupazioni di: ${anagrafica.cogn}</title>
<link rel="stylesheet" type="text/css" href="css/stile.css" >
<link href="css/bootstrap.css" rel="stylesheet" media="screen">
</head>
<body>
<c:set var="ruolo" scope="session" value="${utente.ruolo}"/>
<table id="zebra-verticale" border=1>
	<tr>
		<th scope="col" >Id Persona</th>
		<th scope="col" >Nome occupazione</th>
		<th scope="col" >Data inizio</th>
		<th scope="col" >Data fine</th>
		<th scope="col">Descrizione</th>
		<c:if test="${ruolo == 'admin' }">
			<th scope="col">Comandi</th>
		</c:if>
	</tr>
<c:forEach   var="bean" varStatus="status" items="${occupazioni}">
<tr>
	<td>${bean.id_persona}</td>
	<td>${bean.id_occupazione}</td>
	<td>${bean.data_inizio}</td>
	<td>${bean.data_fine}</td>
	<td>${bean.descrizione}</td>
	<c:if test="${ruolo == 'admin' }">
	<td>
     <form action="AdminMethod" method="post">
        <input class="btn" type="submit" value="Modifica" name="modifica">
        <input class="btn" type="submit" value="Elimina" name="elimina">
     </form>
    </td>
     </c:if>
	
</c:forEach>


</body>
</html>